package us.mifeng.basicvp
import us.mifeng.basicvp.base.BaseActivity
import us.mifeng.basicvp.databinding.ActivityMainBinding
import us.mifeng.basicvp.viewmodel.MainViewModel

class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() {
    override val layoutId: Int
        get() = R.layout.activity_main

    override fun initView() {
        binding.mText.text = "slslsl"
    }

    fun requestData(){
        viewModel.requestMainData() { result ->
            binding.mText.text = result.token
            println("Login successful: ${result.token}")
        }
    }


}